const blockAuditService = require('../service/BlockAuditService');
// const LambdaProxy = require('../utils/LambdaProxy');
// const DateUtil = require('../utils/DateUtil');
// const MarketPriceDto = require('../dto/MarketPriceDto');
// const KLineDto = require('../dto/KLineDto');

// ---------- lambda entry ----------

/**
 * findBlockUsers
 * @param {Object} event
 * @param {Object} context
 * @return {Object}
 */
async function findBlockUsers(event, context) {
  console.info('findBlockUsers', event);

  const results = await blockAuditService.findBlockUsers();

  return results;
}

/**
 * blockingUser
 * @param {Object} event
 * @param {String} event.body.username
 * @param {String} event.body.ids
 * @param {context} context
 * @return {Object}
 */
async function blockingUser(event, context) {
  console.info('blockingUser', event);

  const { username, ids } = event.body;

  await blockAuditService.blockingUser(username, ids);

  return true;
}

module.exports = {
  findBlockUsers,
  blockingUser,
};

// ---------- internal functions ----------
